/ Assembly List / LJCNetCommon / XMLBuilder / GetAttribs

Namespace - LJCNetCommon


Parameters
htmlAttribs - The attributes collection.
textState - The current text state values.

Returns

The attributes text.

Syntax

C#
public String GetAttribs(Attributes htmlAttribs, TextState textState)

Gets the attributes text.

Remarks

The returned text does not end with a new line. This allows for additions after the text.
Begin, Create and End text will start with a new line if the builder text already has a value.

Example

C#
// Root Method Begin
var textState = new TextState();

// Defaults: IndentCharCount = 2, LineLimit = 80, WrapEnabled = false.
var xb = new XMLBuilder(textState);

// Example Method:
var attribs = new Attributes()
{
{ "name", "Someone" },
};
xb.Begin("Person", textState, attribs);
xb.End("Person", textState);
var result = xb.ToString();

// result:
// <Person name="Someone">
// <Person>

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.